package com.example.bootcurriculumproject.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.bootcurriculumproject.entity.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface OrderMapper extends BaseMapper<Orders> {
    @Update("update orders set states=#{status} where consignmentnum=#{orderId}")
    public void updateStatus(int status,String orderId);
    @Select("select states from orders where consignmentnum=#{orderId}")
    public int selectStatus(String orderId);

    @Update("update orders set addressnum=#{num} where consignmentnum=#{consignmentNum}")
    public void updateAddressNum(int num,String consignmentNum);
}
